from django.db import models


# Create your models here.
class User(models.Model):
    """用户表"""
    SEX_CHOICES = (
        (0, 'man'),
        (1, 'woman')
    )
    name = models.CharField(max_length=64, verbose_name='用户名称', null=True)
    sex = models.SmallIntegerField(choices=SEX_CHOICES, default=0, verbose_name='性别', null=True)
    age = models.IntegerField(verbose_name='年龄', null=True)
    token = models.CharField(verbose_name='登录标识', max_length=150, null=True)
    phone = models.CharField(verbose_name='用户手机号', max_length=64, null=True)

    class Meta:
        db_table = 'User'
        verbose_name = '用户表'

    def __str__(self):
        return self.name
